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iAgICAgICAgbGV0IHNvdXJjZUlkID0gL2dldF9wbGF5c291cmNlLy50ZXN0KGlucHV0KSA/IGlucHV0Lm1hdGNoKC9pZD0oXGQqPykmLylbMV0gOiBpbnB1dC5zcGxpdCgiY2lkPSIpWzFdOwogICAgICAgIGxldCBjaWQgPSBzb3VyY2VJZDsKICAgICAgICBsZXQgZGV0YWlsVXJsID0gImh0dHBzOi8vdi4lNzElNzEuY29tL2RldGFpbC9tLyIgKyBjaWQgKyAiLmh0bWwiOwogICAgICAgIGxvZygi6K+m5oOF6aG1OiIgKyBkZXRhaWxVcmwpOwogICAgICAgIHBkZmggPSBqc3AucGRmaDsKICAgICAgICBwZCA9IGpzcC5wZDsKICAgICAgICB0cnkgewogICAgICAgICAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoaHRtbCk7CiAgICAgICAgICAgIFZPRCA9IHsKICAgICAgICAgICAgICAgIHZvZF91cmw6IGlucHV0LAogICAgICAgICAgICAgICAgdm9kX25hbWU6IGpzb24uYy50aXRsZSwKICAgICAgICAgICAgICAgIHR5cGVfbmFtZToganNvbi50eXAuam9pbigiLCIpLAogICAgICAgICAgICAgICAgdm9kX2FjdG9yOiBqc29uLm5hbS5qb2luKCIsIiksCiAgICAgICAgICAgICAgICB2b2RfeWVhcjoganNvbi5jLnllYXIsCiAgICAgICAgICAgICAgICB2b2RfY29udGVudDoganNvbi5jLmRlc2NyaXB0aW9uLAogICAgICAgICAgICAgICAgdm9kX3JlbWFya3M6IGpzb24ucmVjLAogICAgICAgICAgICAgICAgdm9kX3BpYzogdXJsam9pbjIoaW5wdXQsIGpzb24uYy5waWMpCiAgICAgICAgICAgIH0KICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgIGxvZygi6Kej5p6Q54mH5ZCN5rW35oql562J5Z+656GA5L+h5oGv5Y+R55Sf6ZSZ6K+vOiIgKyBlLm1lc3NhZ2UpCiAgICAgICAgfQogICAgICAgIGlmICgvZ2V0X3BsYXlzb3VyY2UvLnRlc3QoaW5wdXQpKSB7CiAgICAgICAgICAgIGV2YWwoaHRtbCk7CiAgICAgICAgICAgIGxldCBpbmRleExpc3QgPSBRWk91dHB1dEpzb24uUGxheWxpc3RJdGVtLmluZGV4TGlzdDsKICAgICAgICAgICAgaW5kZXhMaXN0LmZvckVhY2goZnVuY3Rpb24gKGl0KSB7CiAgICAgICAgICAgICAgICBsZXQgZGF0YVVybCA9ICJodHRwczovL3MudmlkZW8ucXEuY29tL2dldF9wbGF5c291cmNlP2lkPSIgKyBzb3VyY2VJZCArICImcGxhdD0yJnR5cGU9NCZkYXRhX3R5cGU9MyZyYW5nZT0iICsgaXQgKyAiJnZpZGVvX3R5cGU9MTAmcGxuYW1lPXFxJm90eXBlPWpzb24iOwogICAgICAgICAgICAgICAgZXZhbChmZXRjaChkYXRhVXJsLCBmZXRjaF9wYXJhbXMpKTsKICAgICAgICAgICAgICAgIGxldCB2ZGF0YSA9IFFaT3V0cHV0SnNvbi5QbGF5bGlzdEl0ZW0udmlkZW9QbGF5TGlzdDsKICAgICAgICAgICAgICAgIHZkYXRhLmZvckVhY2goZnVuY3Rpb24gKGl0ZW0pIHsKICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZSwKICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaXRlbS5waWMsCiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGl0ZW0uZXBpc29kZV9udW1iZXIgKyAiXHRcdFx05pKt5pS+6YeP77yaIiArIGl0ZW0udGhpcmRMaW5lLAogICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0ZW0ucGxheVVybAogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIHZpZGVvX2xpc3RzID0gdmlkZW9fbGlzdHMuY29uY2F0KHZkYXRhKQogICAgICAgICAgICB9KQogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGxldCBqc29uID0gSlNPTi5wYXJzZShodG1sKTsKICAgICAgICAgICAgdmlkZW9fbGlzdHMgPSBqc29uLmMudmlkZW9faWRzOwogICAgICAgICAgICBsZXQgdXJsID0gImh0dHBzOi8vdi5xcS5jb20veC9jb3Zlci8iICsgc291cmNlSWQgKyAiLmh0bWwiOwogICAgICAgICAgICBpZiAodmlkZW9fbGlzdHMubGVuZ3RoID09PSAxKSB7CiAgICAgICAgICAgICAgICBsZXQgdmlkID0gdmlkZW9fbGlzdHNbMF07CiAgICAgICAgICAgICAgICB1cmwgPSAiaHR0cHM6Ly92LnFxLmNvbS94L2NvdmVyLyIgKyBjaWQgKyAiLyIgKyB2aWQgKyAiLmh0bWwiOwogICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICB0aXRsZTogIuWcqOe6v+aSreaUviIsCiAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmwKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0gZWxzZSBpZiAodmlkZW9fbGlzdHMubGVuZ3RoID4gMSkgewogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB2aWRlb19saXN0cy5sZW5ndGg7IGkgKz0gMzApIHsKICAgICAgICAgICAgICAgICAgICB2aWRlb19saXN0LnB1c2godmlkZW9fbGlzdHMuc2xpY2UoaSwgaSArIDMwKSkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZpZGVvX2xpc3QuZm9yRWFjaChmdW5jdGlvbiAoaXQsIGlkZXgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgb191cmwgPSAiaHR0cHM6Ly91bmlvbi52aWRlby5xcS5jb20vZmNnaS1iaW4vZGF0YT9vdHlwZT1qc29uJnRpZD0xODA0JmFwcGlkPTIwMDAxMjM4JmFwcGtleT02YzAzYmJlOTY1ODQ0OGE0JnVuaW9uX3BsYXRmb3JtPTEmaWRsaXN0PSIgKyBpdC5qb2luKCIsIik7CiAgICAgICAgICAgICAgICAgICAgbGV0IG9faHRtbCA9IGZldGNoKG9fdXJsLCBmZXRjaF9wYXJhbXMpOwogICAgICAgICAgICAgICAgICAgIGV2YWwob19odG1sKTsKICAgICAgICAgICAgICAgICAgICBRWk91dHB1dEpzb24ucmVzdWx0cy5mb3JFYWNoKGZ1bmN0aW9uIChpdDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgaXQxID0gaXQxLmZpZWxkczsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICJodHRwczovL3YucXEuY29tL3gvY292ZXIvIiArIGNpZCArICIvIiArIGl0MS52aWQgKyAiLmh0bWwiOwogICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGl0MS50aXRsZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGl0MS5waWMxNjB4OTAucmVwbGFjZSgiLzE2MCIsICIiKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGl0MS52aWRlb19jaGVja3VwX3RpbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHVybCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IGl0MS5jYXRlZ29yeV9tYXAgJiYgaXQxLmNhdGVnb3J5X21hcC5sZW5ndGggPiAxID8gaXQxLmNhdGVnb3J5X21hcFsxXSA6ICIiCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgbGV0IHlnID0gZC5maWx0ZXIoZnVuY3Rpb24gKGl0KSB7CiAgICAgICAgICAgIHJldHVybiBpdC50eXBlICYmIGl0LnR5cGUgIT09ICLmraPniYciCiAgICAgICAgfSk7CiAgICAgICAgbGV0IHpwID0gZC5maWx0ZXIoZnVuY3Rpb24gKGl0KSB7CiAgICAgICAgICAgIHJldHVybiAhKGl0LnR5cGUgJiYgaXQudHlwZSAhPT0gIuato+eJhyIpCiAgICAgICAgfSk7CiAgICAgICAgVk9ELnZvZF9wbGF5X2Zyb20gPSB5Zy5sZW5ndGggPCAxID8gInFxIiA6ICJxcSQkJHFxIOmihOWRiuWPiuiKsee1riI7CiAgICAgICAgVk9ELnZvZF9wbGF5X3VybCA9IHlnLmxlbmd0aCA8IDEgPyBkLm1hcChmdW5jdGlvbiAoaXQpIHsKICAgICAgICAgICAgcmV0dXJuIGl0LnRpdGxlICsgIiQiICsgaXQudXJsCiAgICAgICAgfSkuam9pbigiIyIpIDogW3pwLCB5Z10ubWFwKGZ1bmN0aW9uIChpdCkgewogICAgICAgICAgICByZXR1cm4gaXQubWFwKGZ1bmN0aW9uIChpdHMpIHsKICAgICAgICAgICAgICAgIHJldHVybiBpdHMudGl0bGUgKyAiJCIgKyBpdHMudXJsCiAgICAgICAgICAgIH0pLmpvaW4oIiMiKQogICAgICAgIH0pLmpvaW4oIiQkJCIpOwogICAgfSksCiAgICDmkJzntKI6ICRqcy50b1N0cmluZygoKSA9PiB7CiAgICAgICAgbGV0IGQgPSBbXTsKICAgICAgICBwZGZhID0ganNwLnBkZmE7CiAgICAgICAgcGRmaCA9IGpzcC5wZGZoOwogICAgICAgIHBkID0ganNwLnBkOwogICAgICAgIGxldCBodG1sID0gcmVxdWVzdChpbnB1dCk7CiAgICAgICAgbGV0IGJhc2VMaXN0ID0gcGRmYShodG1sLCAiYm9keSYmLnJlc3VsdF9pdGVtX3YiKTsKICAgICAgICBsb2coYmFzZUxpc3QubGVuZ3RoKTsKICAgICAgICBiYXNlTGlzdC5mb3JFYWNoKGZ1bmN0aW9uIChpdCkgewogICAgICAgICAgICBsZXQgbG9uZ1RleHQgPSBwZGZoKGl0LCAiLnJlc3VsdF90aXRsZSYmYSYmVGV4dCIpOwogICAgICAgICAgICBsZXQgc2hvcnRUZXh0ID0gcGRmaChpdCwgIi50eXBlJiZUZXh0Iik7CiAgICAgICAgICAgIGxldCBmcm9tVGFnID0gcGRmaChpdCwgIi5yZXN1bHRfc291cmNlJiZUZXh0Iik7CiAgICAgICAgICAgIGxldCBzY29yZSA9IHBkZmgoaXQsICIuZmlndXJlX2luZm8mJlRleHQiKTsKICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBwZGZoKGl0LCAiLmRlc2NfdGV4dCYmVGV4dCIpOwogICAgICAgICAgICAvLyBsZXQgdXJsID0gcGRmaChpdCwgIi5yZXN1bHRfdGl0bGUmJmEmJmhyZWYiKTsKICAgICAgICAgICAgbGV0IHVybCA9IHBkZmgoaXQsICJkaXYmJnItZGF0YSIpOwogICAgICAgICAgICAvLyBsb2cobG9uZ1RleHQpOwogICAgICAgICAgICAvLyBsb2coc2hvcnRUZXh0KTsKICAgICAgICAgICAgLy8gbG9nKCd1cmw6Jyt1cmwpOwogICAgICAgICAgICBsZXQgaW1nID0gcGQoaXQsICIuZmlndXJlX3BpYyYmc3JjIik7CiAgICAgICAgICAgIHVybCA9ICJodHRwczovL25vZGUudmlkZW8ucXEuY29tL3gvYXBpL2Zsb2F0X3ZpbmZvMj9jaWQ9IiArIHVybC5tYXRjaCgvLipcLyguKj8pXC5odG1sLylbMV07CiAgICAgICAgICAgIGxvZyhzaG9ydFRleHQgKyAifCIgKyB1cmwpOwogICAgICAgICAgICBpZiAoZnJvbVRhZy5tYXRjaCgv6IW+6K6vLykpIHsKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxvbmdUZXh0LnNwbGl0KHNob3J0VGV4dClbMF0sCiAgICAgICAgICAgICAgICAgICAgaW1nOiBpbWcsCiAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmwsCiAgICAgICAgICAgICAgICAgICAgY29udGVudDogY29udGVudCwKICAgICAgICAgICAgICAgICAgICBkZXNjOiBzaG9ydFRleHQgKyAiICIgKyBzY29yZQogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIHNldFJlc3VsdChkKTsKICAgIH0pLAp9
|